home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / xv_pc17.zip / EXCLUSIV.INC < prev    next >
Text File  |  1994-06-24  |  1KB  |  35 lines

  1. {
  2. Windows with exclusive access in the XView-PC interface
  3. By Antonio Carlos Moreirao de Queiroz - acmq@coe.ufrj.br
  4. Version 1.0 - 10/04/94
  5. Version 1.1 - 24/06/94 "wallpaper" set only if necessary
  6.  
  7. Procedure similar to "open_window", but with the control returning to the
  8. calling point when the window "w" is closed. "w" is a pointer to a "frame".
  9. The window "w" must be initially closed. Its "callbacks" can open other
  10. windows, that must be also initially closed. The procedure returns when all
  11. the new windows are closed with the "close_window" procedure.
  12. This is a "trick" with the interface. Improper use may cause a "crash".
  13. Use in simple warnings to the user that require immediate response.
  14. Try to use "open_window" instead of this procedure whenever possible,
  15. The program must use the units XView and Graph.
  16. }
  17.  
  18. PROCEDURE open_exclusive_window(w:Xv_opaque);
  19. VAR
  20.   temp_w:Xv_opaque;
  21.   temp:BOOLEAN;
  22.   VP:ViewPortType;
  23. BEGIN
  24.   temp_w:=active_w;
  25.   temp:=wallpaper;
  26.   wallpaper:=wallpaper or (active_w<>nil);
  27.   active_w:=nil;
  28.   GetViewSettings(VP);
  29.   xv_main_loop(w);
  30.   xv_end:=FALSE;
  31.   active_w:=temp_w;
  32.   wallpaper:=temp;
  33.   WITH VP DO SetViewPort(x1,y1,x2,y2,Clip)
  34. END;
  35.